package com.corecloud.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.corecloud.entity.SysAppEntity;
import com.corecloud.mapper.mysql.SysAppMapper;
import com.corecloud.service.SysAppService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("sysAppService")
public class SysAppServiceImpl implements SysAppService {

    @Autowired
    private SysAppMapper sysAppMapper;


    @Override
    public SysAppEntity selectOne(QueryWrapper<SysAppEntity> paras) {
        return sysAppMapper.selectOne(paras);
    }

    @Override
    public List<SysAppEntity> selectList(QueryWrapper<SysAppEntity> qw) {
        return sysAppMapper.selectList(qw);
    }

    @Override
    public List<Map<String, Object>> selectMap(QueryWrapper<SysAppEntity> qw) {
        return sysAppMapper.selectMaps(qw);
    }

    @Override
    public Page<SysAppEntity> getInfoByPage(Page page, QueryWrapper<SysAppEntity> qw) {
        return sysAppMapper.selectPage(page,qw);
    }

    @Override
    public void updateInfo(SysAppEntity info) {
        sysAppMapper.updateById(info);
    }

    @Override
    public void deleteInfo(Integer id) {
        sysAppMapper.deleteById(id);
    }

    @Override
    public Integer insertInfo(SysAppEntity info) {
        return sysAppMapper.insert(info);
    }
}